<?php
/**
 * Created by PhpStorm.
 * User: Hasee
 * Date: 2020/4/5
 * Time: 20:59
 */
$uid=(int)$_POST['uid'];
$name=addslashes($_POST['name']);
$class=addslashes($_POST['class']);
$age=(int)$_POST['age'];
$mb=addslashes($_POST['mb']);
/*$uid=23;
$name='222c';
$class=22;
$age=2;
$mb='f3e';*/
$sql="UPDATE student SET
      name='$name',class=$class,age=$age,studentMb='$mb'
      WHERE uid=$uid";
$bool=mysqli_query($mysql,$sql);
if ($bool)
{
    JSON(200,'成功');
}else{
    JSON(400,'失败');
}